import request from '@/utils/request'

// 车辆列表
export function getCarList(query) {
    return request({
        url: '/system/car_details/list',
        method: 'post',
        data: query
    })
}

export function getWhiteCarList(query) {
    return request({
        url: '/cameraDevices/queryAll',
        method: 'get',
        data: query
    })
}

export function addCar(query) {
    return request({
        url: '/system/car_details/add',
        method: 'post',
        data: query
    })
}
//http://192.168.8.7:1024/system/car_details/edit
export function editCar(query) {
    return request({
        url: '/system/car_details/edit',
        method: 'put',
        data: query
    })
}

//http://192.168.8.7:1024/system/car_details/delete/2130

export function deleteCar(query) {
    return request({
        url: '/system/car_details/delete/'+query,
        method: 'delete',
        data: query
    })
}

//http://192.168.8.7:1024/system/car_details/template/downLoad?fileName=
export function downloadCarTempate(query) {
    return request({
        url: '/system/car_details/template/downLoad',
        method: 'get',
        params: query,
        responseType: 'arraybuffer',
        headers: {'Content-Type': 'application/octet-stream'},
    })
}
//http://192.168.8.7:1024/system/car_pass_record/picture/list?plate_num=&endTime=&startTime=&pageNum=1&pageSize=10&searchCount=true

export function getCarRecordLst(query) {
    return request({
        url: '/system/car_pass_record/picture/list',
        method: 'get',
        params: query
      
    })
}

// /http://192.168.8.7:1024/system/car_pass_record/export/picture?carPlate=&endTime=2024-11-13&startTime=2024-11-10
export function exportCarRecordLst(query) {
    return request({
        url: '/system/car_pass_record/export/picture',
        method: 'get',
        params: query
      
    })
}
//车辆 -设备管理 http://192.168.8.7:1024/cameraDevices/queryPage
export function getCarDevice(query) {
    return request({
        url: '/cameraDevices/queryPage',
        method: 'post',
        data: query
      
    })
}
//添加设备 http://192.168.8.7:1024/cameraDevices/add

export function addCarDevice(query) {
    return request({
        url: '/cameraDevices/add',
        method: 'post',
        data: query
      
    })
}




